package resourcesBundle;

import java.util.Enumeration;
import java.util.ResourceBundle;

public class ResourcesBundleReadProperties {

	public static void main(String[] args) {
		ResourceBundle rb = ResourceBundle.getBundle("resourcesBundle.vi");
		Enumeration <String> keys = rb.getKeys();
		// get all
		while (keys.hasMoreElements()) {
			String key = keys.nextElement();
			String value = rb.getString(key);
			System.out.println(key + ": " + value);
		}
		// get name
		System.out.println("Get value from key:"+ rb.getString("username"));
		System.out.println("Get value from key:"+ rb.getString("password"));
	}

}
